﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PubSubLite
{
    internal class CommandMessage<T, T2> : Message<T>, ICommandMessage<T, T2>
    {
        public CommandMessage(T data, Action<T2> callback)
            : base(data)
        {
            Callback = callback;
        }


        public Action<T2> Callback
        {
            get;
            private set;
        }

        public override bool IsCommand
        {
            get
            {
                return true;
            }
        }

        

        Type ICommandMessage<T, T2>.ReturnMessageType
        {
            get { return typeof(T2); }
        }
    }
}
